GetHostSerialNumber

SoftwareShield ClientProtector COM Component > ClientProtector (SSCProtector) Reference > GetHostSerialNumber

## GetHostSerialNumber

The GetHostSerialNumber function retrieves the Host Serial Number stored in the currently loaded license.

This function and field is now deprecated. Please instead use GetAuthorizationDetailsEx to get the Serial Number stored inside each Authorization Definition. Also see: GetAllSerialNumbers.

###### Syntax

HRESULT GetHostSerialNumber ( BSTR * HostSerialNumber );

###### Parameters

HostSerialNumber

[OUT] Wide character string which will return with the Host Serial Number of the currently loaded license.

###### Remarks

The GetHostSerialNumber function retrieves the Host Serial Number stored in the currently loaded license. If the Host Serial Number is not set the string will return empty.

Note that this serial number is for your own use only and is not directly used by the ClientProtector logic. See General License Details for more information.

This field is a dynamically allocated string and has no declared maximum length. The theoretical maximum length of this string value is 2GB (two gigabytes). In practice this means that the maximum length of this string is limited only by the amount of memory available to your application.

###### Return Value

As with all COM function calls they return an HRESULT. HRESULT is a data type that is a 32-bit error or warning code. Check your compilers documentation for information on interpreting the HRESULT value.

###### Function Information

Exposed By Interface: | "ISSCProtector"
Exposed In COM Server Binaries: | "SSCProt.dll" and "SSCProtD.dll"